/*************************************************************
 * File: Conditions.java
 * Copyright (c) 2012
 * Author: Huang Shaobin
 * Email: Shaobin.Software@gmail.com Shaobin_Software@163.com 
 * Date: Feb 21, 2013
 * Description: 
 ************************************************************/

package snow.core.persistence;

import java.util.ArrayList;
import java.util.List;

/**
 * 查询条件集
 * 
 * @author Shaobin.Software@gmail.com Shaobin_Software@163.com
 * @version 1.0
 */
public abstract class Conditions {

	private List<Condition> conditions;

	public Conditions() {
		this.conditions = new ArrayList<Condition>();
	}

	public Conditions addCondition(Condition condition) {
		this.conditions.add(condition);
		return this;
	}

	public List<Condition> getConditions() {
		return new ArrayList<Condition>(conditions);
	}
	
	public void clear() {
		this.conditions.clear();
	}
}
